<?php


$surname = array(
		'name'	=> 'surname',
		'id'	=> 'surname',
		'value' => set_value('surname', $user_infos['surname']),
		'maxlength'	=> $this->config->item('surname_max_length', 'user'),
		'size'	=> 20,
);
$firstname = array(
		'name'	=> 'firstname',
		'id'	=> 'firstname',
		'value' => set_value('firstname', $user_infos['firstname']),
		'maxlength'	=> $this->config->item('firstname_max_length', 'user'),
		'size'	=> 20,
);

$city = array(
		'name'	=> 'city',
		'id'	=> 'city',
		'value' => set_value('city', $user_infos['city']),
		'maxlength'	=> $this->config->item('city_max_length', 'user'),
		'size'	=> 30,
);
$phone = array(
                'name'	=> 'phone',
                'id'	=> 'phone',
                'value'	=> set_value('phone', $user_infos['phone']),
                'maxlength'	=> 30,
                'size'	=> 20,
);
$dob = array(
                'name'	=> 'dob',
                'id'	=> 'dob',
                'value'	=> set_value('dob', $user_infos['date_of_birth']),
                'maxlength'	=> 30,
                'size'	=> 20,
);


?>
<?php echo form_open($this->uri->uri_string()); ?>

<h2>Modifier ses coordonnées</h2>



<table>	
	<tr>
	
		<td><?php echo form_label('Nom', $surname['id']); ?></td>
		<td><?php echo form_input($surname); ?></td>
		<td style="color: red;"><?php echo form_error($surname['name']); ?><?php echo isset($errors[$surname['name']])?$errors[$surname['name']]:''; ?></td>
	</tr>
	<tr>
		<td><?php echo form_label('Prenom', $firstname['id']); ?></td>
		<td><?php echo form_input($firstname); ?></td>
		<td style="color: red;"><?php echo form_error($firstname['name']); ?><?php echo isset($errors[$firstname['name']])?$errors[$firstname['name']]:''; ?></td>
	</tr>
	<tr>
		<td><?php echo form_label('ville', $city['id']); ?></td>
		<td><?php echo form_input($city); ?></td>
		<td style="color: red;"><?php echo form_error($city['name']); ?><?php echo isset($errors[$city['name']])?$errors[$city['name']]:''; ?></td>
	</tr>
	<tr>
		<td><?php echo form_label('Telephone', $phone['id']); ?></td>
		<td><?php echo form_input($phone); ?></td>
		<td style="color: red;"><?php echo form_error($phone['name']); ?><?php echo isset($errors[$phone['name']])?$errors[$phone['name']]:''; ?></td>
	</tr>
	<tr>
		<td><?php echo form_label('Annee de naissance', $dob['id']); ?></td>
		<td><?php echo form_input($dob); ?></td>
		<td style="color: red;"><?php echo form_error($dob['name']); ?><?php echo isset($errors[$dob['name']])?$errors[$dob['name']]:''; ?></td>
	</tr>
	
</table>
<?php echo form_submit('modify_account', 'Modifier'); ?>
<?php echo form_close(); ?>